<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a {
            width: 100px;
            height: 100px;
            background-color: #f00;

            /* 使用动画 */
            /* animation: 名字 时间 ...; */

            /* infinite 循环播放 */
            animation: a .3s infinite;


            /* animation: name  time  ; */
            /* animation-name: a; */
            /* animation-duration: 1s; */
            /* animation-timing-function: cubic-bezier(); */
            /* animation-fill-mode: forwards; */

            /* 延迟 */
            animation-delay: 1s;
        }



        /* 改变颜色的动画 */
        /* 关键帧  --- 声明动画 */
        @keyframes a {
            0% {
                background-color: #f00;
            }

            20% {
                background-color: #000;
            }

            40% {
                background-color: #ff0;
            }

            60% {
                background-color: #0f0;
            }

            100% {
                background-color: #00f;
            }
        }

        @keyframes b {}

        @keyframes c {}
    </style>
</head>

<body>

    <div class="a"></div>

</body>

</html>